package com.boarsoft.flow.demo.query;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.boarsoft.flow.core.bean.ProcessHandler;

/**
 * 查询指定用户的现金账户余额
 * 
 * @author Mac_J
 *
 */
public class FundHandlerImpl implements ProcessHandler {
	private static final Logger log = LoggerFactory.getLogger(FundHandlerImpl.class);

	@Override
	public Object process(String entry, Object data, Throwable e) throws InterruptedException {
		String userId = (String) data;
		long fund = Math.round(Math.random() * 10000);
		log.info("User {} fund account = {}", userId, fund);
		return fund;
	}
}
